/**
 *
 */
package com.iapcursos.portal.procefet.modelo.beans.entitys;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * @author Gleison
 *
 */
@Entity
@Table(name = "DISCIPLINAS")
public class Disciplina implements Serializable{
	/**
	 *
	 */
	private static final long serialVersionUID = 1L;
	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	private int id;
	private String nome;
	@OneToMany(mappedBy="disciplina")
	private List<Aula> aulas = new ArrayList<Aula>();

	/**
	 *
	 */
	public Disciplina() {

	}
	/**
	 * @return the nome
	 */
	public String getNome() {

			return this.nome;

	}
	/**
	 * @param nome the nome to set
	 */
	public void setNome(String nome) {
		this.nome = nome;
	}

	/**
	 * @return the id
	 */
	public int getId() {
		return id;
	}
	public List<Aula> getAulas() {
		return aulas;
	}
	public void setAulas(List<Aula> aulas) {
		this.aulas = aulas;
	}

	@Override
	public String toString(){

			return this.nome;

	}

}
